package edu.ccut.saturn.studio.naviagtor.actions.model;

import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.PlatformUI;

import edu.ccut.saturn.studio.Activator;
import edu.ccut.saturn.studio.Images;
import edu.ccut.saturn.studio.core.util.action.SaturnAction;
import edu.ccut.saturn.studio.core.util.eclipse.Messages;
import edu.ccut.saturn.studio.core.util.wizard.SaturnWizard;
import edu.ccut.saturn.studio.naviagtor.wizard.model.CreateWorkflowWizard;

public class CreateWorkflowModelAction extends SaturnAction {
	
	public CreateWorkflowModelAction() {
//		setText("Workflow");
		setText(Messages.getString("CreateWorkflowModelAction.workflow")); //$NON-NLS-1$
		setImageDescriptor(Activator
				.getImageDescriptor(Images.WORKFLOW_FOLDER_ICON));
	}

	public void run() {
		SaturnWizard wizard = new CreateWorkflowWizard();
		wizard
				.init(PlatformUI.getWorkbench(), super.getStructuredSelection());
		WizardDialog wizarddialog = new WizardDialog(PlatformUI.getWorkbench()
				.getActiveWorkbenchWindow().getShell(), wizard);
		wizarddialog.open();
	}

}
